package sort;

import sort.on.CountingSort;
import sort.on2.BubbleSort;
import sort.on2.InsertionSort;
import sort.on2.SelectionSort;
import sort.onlogn.MergeSort;
import sort.onlogn.QuickSort;

import java.util.Arrays;

/**
 * @author yeyangtao created at 15:07 2020/9/25
 */
public class Test {
    public static void main(String[] args) {
        int[] a = {1, 4, 5, 2, 3, 6};
        //bubbleSortTest(a);
        //insertionSortTest(a);
        // selectionSortTest(a);
        //mergeSortTest(a);
        //quickTest(a);
        countingSort(a);
    }

    static void bubbleSortTest(int[] a) {
        BubbleSort.bubbleSort(a);
        System.out.println(Arrays.toString(a));
    }

    static void insertionSortTest(int[] a) {
        InsertionSort.insertionSort(a);
        System.out.println(Arrays.toString(a));
    }

    static void selectionSortTest(int[] a) {
        SelectionSort.selectionSort(a);
        System.out.println(Arrays.toString(a));
    }

    static void mergeSortTest(int[] a) {
        MergeSort.mergeSort(a);
        System.out.println(Arrays.toString(a));
    }

    static void quickTest(int[] a) {
        QuickSort.quickSort(a);
        System.out.println(Arrays.toString(a));
    }

    static void countingSort(int[] a) {
        CountingSort.countingSort(a);
        System.out.println(Arrays.toString(a));
    }
}
